#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
using namespace std;
int main(){
	int T,K;
	int b;
	int sum;
	int Total; 
	cin>>T>>K;
	int a[K];
	while(K--){
		for(int i=0;i<K;i++){
			cin>>a[i];
		}
		if(a[0]>a[3]){
			b==1;
			if(a[1]!=b){
				a[2]=(-1)*a[2];
				
			}
			else{
				a[2]=a[2]*1;
			}
			sum+=a[2];
			Total=sum+T;
			if(sum>0){
				cout<<"WIN"<<sum<<endl;
				cout<<Total<<endl;
				
			}
			else if(sum==0){
				cout<<"GAME OVER";
			}else{
				cout<<"LOSE"<<sum;
				
				
			}
		}
		if(a[0]<a[3]){
			b==1;
		if(a[1]!=b){
				a[2]=(-1)*a[2];
				
			}
			else{
				a[2]=a[2]*1;
			}
			sum+=a[2];
			Total=sum+T;
			if(sum>0){
				cout<<"WIN"<<sum<<endl;
				cout<<Total<<endl;
				
			}			
		}

	}
}
